package com.zn.kjj.service;

import com.zn.kjj.dao.SysLoginDao;
import com.zn.kjj.entity.SysLogin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author Administrator
 */
@Service
public class SysLoginImpl implements SysLoginable {

    @Autowired
    private SysLoginDao sysLoginDao;
    @Override
    public SysLogin selectByLoginName(String strLoginName){
        try {
            return sysLoginDao.selectByLoginName(strLoginName);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

    @Override
    public int updateByPrimaryKeySelective(SysLogin record) {
        int flag = 0;
        try {
            flag = sysLoginDao.updateByPrimaryKeySelective(record);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return flag;
    }

    @Override
    public SysLogin selectByPrimaryKey(String guid) {
        try {
            return sysLoginDao.selectByPrimaryKey(guid);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

    @Override
    public int updateByPrimaryKey(SysLogin record) {
        int flag = 0;
        try {
            flag = sysLoginDao.updateByPrimaryKey(record);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return flag;
    }
}
